<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .a {
            width: 200px;
            height: 100px;
            background-color: green;
            /*
            overflow:visible 默认值，溢出内容会显示在元素外面
            overflow:hideen 溢出内容隐藏
            overflow:scroll 显示滚动条
            overflow:auto 如果有溢出会添加滚动条，没有溢正常显示
            overflow:inherit 继承父元素overflow属性
            两者搭配使用:overflow-x: auto;averflow-y:hideen;
        */
            overflow: auto;
            margin-bottom: 20px;
        }

        .s {
            width: 200px;
            height: 100px;
            background-color: red;
            overflow: hidden;
            overflow-x: auto;
        }
    </style>
</head>

<body>
    <div class="a">
        Lorem ipsum dolor sit amet consectetur adipisicing elit. Odio minus id eum deserunt obcaecati veritatis rem
        veniam! Placeat et pariatur fugiat expedita aut incidunt voluptatem? Rerum, nostrum. Hic, commodi ad?
    </div>
    <div class="s"><img src="../img/JK.png" alt=""></div>
</body>

</html>